g05caf

g05caf © Numerical Algorithms Group, 2002.

Purpose

G05CAF Pseudo-random real numbers, uniform distribution over (0,1)

Synopsis

[fun_value] = g05caf

Description

 
 This routine returns the next pseudo-random number from the basic
 uniform (0,1) generator.
 
 The basic generator uses a multiplicative congruential algorithm:
 
                              13         59
                       b   =13  *b bmod 2 
                        i+1       i      
 
                                 59                          
 The integer b    is divided by 2   to yield a real value y, which
              i+1                                            
 is guaranteed to satisfy
 
                               0<y<1
 
 The value of b  is saved internally in the code. The initial 
               i                                             
                                           32             
 value b  is set by default to 123456789*(2  +1), but the sequence
        0                                                 
 may be re-initialized by a call to G05CBF (for a repeatable 
 sequence) or G05CCF (for a non-repeatable sequence). The current 
 value of b  may be saved by a call to G05CFF, and restored by a 
           i                                                    
 call to G05CGF.
 
 G05FAF may be used to generate a vector of n pseudo-random 
 numbers which are exactly the same as n successive values of 
 G05CAF. On vector-processing machines G05FAF is likely to be much
 faster.
 

Parameters

g05caf

Required Input Arguments: